# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-06-03 16:05:08 UTC using RuboCop version 1.30.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
# Include: **/*.gemspec
Gemspec/OrderedDependencies:
  Exclude:
    - 'thredded.gemspec'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Include.
# Include: **/*.gemspec
Gemspec/RequireMFA:
  Exclude:
    - 'thredded.gemspec'

# Offense count: 1
# Configuration parameters: Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
  Exclude:
    - 'thredded.gemspec'

# Offense count: 82
# This cop supports safe autocorrection (--autocorrect).
Layout/EmptyLineAfterGuardClause:
  Enabled: false

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Layout/EmptyLineAfterMagicComment:
  Exclude:
    - '.simplecov'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
# AllowedMethods: alias_method, public, protected, private
Layout/EmptyLinesAroundAttributeAccessor:
  Exclude:
    - 'app/forms/thredded/post_form.rb'
    - 'app/forms/thredded/private_post_form.rb'

# Offense count: 81
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Layout/HashAlignment:
  Exclude:
    - 'app/controllers/thredded/preferences_controller.rb'
    - 'app/mailer_previews/thredded/base_mailer_preview.rb'
    - 'app/models/thredded/messageboard.rb'
    - 'app/models/thredded/messageboard_user.rb'
    - 'app/models/thredded/post.rb'
    - 'app/models/thredded/post_moderation_record.rb'
    - 'app/models/thredded/private_post.rb'
    - 'app/models/thredded/private_topic.rb'
    - 'app/models/thredded/topic.rb'
    - 'app/models/thredded/user_extender.rb'
    - 'db/migrate/20160329231848_create_thredded.rb'
    - 'lib/thredded/content_formatter.rb'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented
Layout/LineEndStringConcatenationIndentation:
  Exclude:
    - 'lib/thredded/db_tools.rb'
    - 'lib/thredded/html_pipeline/onebox_filter.rb'
    - 'lib/thredded/users_provider.rb'
    - 'spec/lib/thredded/content_formatter_spec.rb'

# Offense count: 10
# This cop supports safe autocorrection (--autocorrect).
Lint/AmbiguousOperatorPrecedence:
  Exclude:
    - 'app/helpers/thredded/urls_helper.rb'
    - 'app/models/concerns/thredded/post_common.rb'
    - 'app/policies/thredded/messageboard_policy.rb'
    - 'app/policies/thredded/post_policy.rb'
    - 'app/policies/thredded/private_post_policy.rb'
    - 'app/view_models/thredded/messageboard_group_view.rb'
    - 'lib/thredded/html_pipeline/utils.rb'
    - 'spec/factories.rb'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: RequireParenthesesForMethodChains.
Lint/AmbiguousRange:
  Exclude:
    - 'lib/thredded/database_seeder.rb'

# Offense count: 2
# Configuration parameters: AllowedMethods.
# AllowedMethods: enums
Lint/ConstantDefinitionInBlock:
  Exclude:
    - 'spec/lib/thredded/all_view_hooks_spec.rb'
    - 'spec/lib/thredded/content_formatter_spec.rb'

# Offense count: 6
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
  Exclude:
    - 'lib/thredded/database_seeder.rb'
    - 'spec/models/thredded/topic_spec.rb'

# Offense count: 10
Lint/MissingSuper:
  Exclude:
    - 'lib/thredded/email_transformer/base.rb'
    - 'spec/support/system/page_object/messageboard.rb'
    - 'spec/support/system/page_object/notification_preferences.rb'
    - 'spec/support/system/page_object/post.rb'
    - 'spec/support/system/page_object/posts.rb'
    - 'spec/support/system/page_object/private_topic.rb'
    - 'spec/support/system/page_object/private_topics.rb'
    - 'spec/support/system/page_object/topic.rb'
    - 'spec/support/system/page_object/topics.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/NonDeterministicRequireOrder:
  Exclude:
    - 'spec/spec_helper.rb'

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
Lint/RedundantCopDisableDirective:
  Exclude:
    - 'app/view_models/thredded/topic_view.rb'
    - 'lib/thredded/database_seeder.rb'
    - 'spec/helpers/thredded/icon_helper_spec.rb'
    - 'spec/i18n_spec.rb'
    - 'spec/migration/migration_spec.rb'
    - 'spec/models/factories_spec.rb'
    - 'spec/spec_helper.rb'
    - 'thredded.gemspec'

# Offense count: 1
# Configuration parameters: AllowComments, AllowNil.
Lint/SuppressedException:
  Exclude:
    - 'lib/thredded/database_seeder.rb'

# Offense count: 2
# Configuration parameters: IgnoredMethods.
Metrics/CyclomaticComplexity:
  Max: 10

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Migration/DepartmentName:
  Exclude:
    - 'lib/thredded/database_seeder.rb'

# Offense count: 2
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
  Exclude:
    - 'i18n-tasks.gemfile'
    - 'spec/gemfiles/i18n-tasks.gemfile'

# Offense count: 30
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
# SupportedStyles: snake_case, normalcase, non_integer
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
Naming/VariableNumber:
  Exclude:
    - 'spec/commands/thredded/notify_following_users_spec.rb'
    - 'spec/commands/thredded/notify_private_topic_users_spec.rb'
    - 'spec/models/thredded/messageboard_group_spec.rb'
    - 'spec/models/thredded/messageboard_spec.rb'
    - 'spec/view_models/thredded/messageboard_group_view_spec.rb'

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
RSpec/BeEq:
  Exclude:
    - 'spec/models/thredded/messageboard_spec.rb'
    - 'spec/models/thredded/post_spec.rb'
    - 'spec/models/thredded/topic_spec.rb'
    - 'spec/models/thredded/user_messageboard_preference_spec.rb'
    - 'spec/view_models/thredded/topic_view_spec.rb'

# Offense count: 6
# This cop supports safe autocorrection (--autocorrect).
RSpec/ContextMethod:
  Exclude:
    - 'spec/lib/thredded/content_formatter_spec.rb'
    - 'spec/lib/thredded_spec.rb'
    - 'spec/models/user_spec.rb'

# Offense count: 84
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: SkipBlocks, EnforcedStyle.
# SupportedStyles: described_class, explicit
RSpec/DescribedClass:
  Enabled: false

# Offense count: 31
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowConsecutiveOneLiners.
RSpec/EmptyLineAfterExample:
  Enabled: false

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
RSpec/ExcessiveDocstringSpacing:
  Exclude:
    - 'spec/models/thredded/topic_spec.rb'

# Offense count: 6
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: method_call, block
RSpec/ExpectChange:
  Exclude:
    - 'spec/lib/thredded/database_seeder_spec.rb'

# Offense count: 18
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Include.
# Include: spec/factories.rb, spec/factories/**/*.rb, features/support/factories/**/*.rb
RSpec/FactoryBot/FactoryClassName:
  Exclude:
    - 'spec/factories.rb'

# Offense count: 1
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
  Exclude:
    - 'spec/system/thredded/user_visits_unread_page.rb'

# Offense count: 2
RSpec/LeakyConstantDeclaration:
  Exclude:
    - 'spec/lib/thredded/all_view_hooks_spec.rb'
    - 'spec/lib/thredded/content_formatter_spec.rb'

# Offense count: 1
RSpec/MultipleDescribes:
  Exclude:
    - 'spec/system/thredded/user_updates_preferences_spec.rb'

# Offense count: 49
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
  Max: 11

# Offense count: 2
RSpec/RepeatedExampleGroupBody:
  Exclude:
    - 'spec/models/thredded/topic_spec.rb'

# Offense count: 17
RSpec/StubbedMock:
  Exclude:
    - 'spec/controllers/thredded/private_topics_controller_spec.rb'
    - 'spec/helpers/thredded/icon_helper_spec.rb'
    - 'spec/lib/thredded/content_formatter_spec.rb'
    - 'spec/models/thredded/post_spec.rb'
    - 'spec/models/thredded/private_post_spec.rb'
    - 'spec/models/user_spec.rb'
    - 'spec/policies/post_policy_spec.rb'
    - 'spec/policies/topic_policy_spec.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/EnumHash:
  Exclude:
    - 'app/models/concerns/thredded/moderation_state.rb'
    - 'app/models/thredded/user_topic_follow.rb'

# Offense count: 4
# Configuration parameters: EnforcedStyle.
# SupportedStyles: slashes, arguments
Rails/FilePath:
  Exclude:
    - 'lib/thredded/db_tools.rb'
    - 'spec/setup_for_tests.rb'
    - 'spec/spec_helper.rb'

# Offense count: 5
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent:
  Exclude:
    - 'app/models/thredded/post.rb'
    - 'app/models/thredded/private_topic.rb'
    - 'app/models/thredded/topic.rb'

# Offense count: 2
# Configuration parameters: Include.
# Include: app/helpers/**/*.rb
Rails/HelperInstanceVariable:
  Exclude:
    - 'app/helpers/thredded/icon_helper.rb'

# Offense count: 2
# Configuration parameters: Include.
# Include: spec/**/*.rb, test/**/*.rb
Rails/I18nLocaleAssignment:
  Exclude:
    - 'spec/dummy/app/controllers/concerns/set_locale.rb'

# Offense count: 1
Rails/I18nLocaleTexts:
  Exclude:
    - 'spec/dummy/app/controllers/sessions_controller.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Rails/IndexWith:
  Exclude:
    - 'lib/thredded/database_seeder.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/NegateInclude:
  Exclude:
    - 'app/models/thredded/private_topic.rb'
    - 'spec/spec_helper.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Include.
# Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
Rails/Output:
  Exclude:
    - 'lib/thredded/database_seeder.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: conservative, aggressive
Rails/PluckInWhere:
  Exclude:
    - 'lib/thredded.rb'

# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Include.
# Include: **/Rakefile, **/*.rake
Rails/RakeEnvironment:
  Exclude:
    - 'Rakefile'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Rails/RedundantForeignKey:
  Exclude:
    - 'app/models/concerns/thredded/topic_common.rb'
    - 'app/models/thredded/messageboard_group.rb'

# Offense count: 13
# This cop supports safe autocorrection (--autocorrect).
Rails/RedundantPresenceValidationOnBelongsTo:
  Exclude:
    - 'app/models/thredded/category.rb'
    - 'app/models/thredded/messageboard_notifications_for_followed_topics.rb'
    - 'app/models/thredded/notifications_for_followed_topics.rb'
    - 'app/models/thredded/notifications_for_private_topics.rb'
    - 'app/models/thredded/post.rb'
    - 'app/models/thredded/topic.rb'
    - 'app/models/thredded/user_detail.rb'
    - 'app/models/thredded/user_messageboard_preference.rb'
    - 'app/models/thredded/user_preference.rb'
    - 'app/models/thredded/user_topic_follow.rb'

# Offense count: 20
Rails/ReflectionClassName:
  Enabled: false

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Rails/SquishedSQLHeredocs:
  Exclude:
    - 'app/models/concerns/thredded/post_common.rb'
    - 'app/models/thredded/post_moderation_record.rb'

# Offense count: 1
# Configuration parameters: Include.
# Include: spec/**/*.rb, test/**/*.rb
Rails/TimeZoneAssignment:
  Exclude:
    - 'spec/spec_helper.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/CaseLikeIf:
  Exclude:
    - 'lib/thredded/html_pipeline/spoiler_tag_filter.rb'
    - 'lib/thredded/webpack_assets.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: ==, equal?, eql?
Style/ClassEqualityComparison:
  Exclude:
    - 'app/mailers/thredded/base_mailer.rb'

# Offense count: 1
Style/CombinableLoops:
  Exclude:
    - 'spec/lib/thredded/all_view_hooks_spec.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/ExpandPathArguments:
  Exclude:
    - 'config.ru'
    - 'spec/dummy/config.ru'

# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedVars.
Style/FetchEnvVar:
  Exclude:
    - 'Rakefile'
    - 'spec/dummy/config/environments/production.rb'
    - 'spec/dummy/config/initializers/rollbar.heroku.rb'
    - 'spec/dummy/config/initializers/secret_token.rb'
    - 'spec/spec_helper.rb'

# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
Style/GlobalStdStream:
  Exclude:
    - 'lib/thredded/database_seeder.rb'
    - 'spec/dummy/config/environments/production.rb'
    - 'spec/setup_for_tests.rb'
    - 'spec/spec_helper.rb'

# Offense count: 13
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces
Style/HashAsLastArrayItem:
  Exclude:
    - 'app/forms/thredded/post_form.rb'
    - 'app/forms/thredded/private_post_form.rb'
    - 'app/forms/thredded/private_topic_form.rb'
    - 'app/forms/thredded/topic_form.rb'
    - 'db/upgrade_migrations/20180110200009_upgrade_thredded_v0_14_to_v0_15.rb'
    - 'lib/thredded/database_seeder.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/KeywordParametersOrder:
  Exclude:
    - 'app/models/thredded/post.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: literals, strict
Style/MutableConstant:
  Exclude:
    - 'app/models/concerns/thredded/friendly_id_reserved_words_and_pagination.rb'
    - 'lib/thredded/html_pipeline/at_mention_filter.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/NegatedIfElseCondition:
  Exclude:
    - 'app/controllers/thredded/moderation_controller.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/NilLambda:
  Exclude:
    - 'spec/lib/thredded_spec.rb'
    - 'spec/views/thredded/user/link_spec.rb'

# Offense count: 1
Style/OpenStructUse:
  Exclude:
    - 'spec/factories.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
  Exclude:
    - '.simplecov'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Methods.
Style/RedundantArgument:
  Exclude:
    - 'spec/lib/thredded/all_view_hooks_spec.rb'
    - 'spec/support/system/fake_content.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantAssignment:
  Exclude:
    - 'app/commands/thredded/notify_private_topic_users.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantParentheses:
  Exclude:
    - 'spec/dummy/app/controllers/sessions_controller.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantRegexpCharacterClass:
  Exclude:
    - 'lib/thredded/html_pipeline/spoiler_tag_filter.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
  Exclude:
    - 'app/controllers/thredded/topics_controller.rb'

# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SlicingWithRange:
  Exclude:
    - 'lib/thredded/database_seeder.rb'
    - 'lib/thredded/html_pipeline/onebox_filter.rb'
    - 'lib/thredded/html_pipeline/utils.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowModifier.
Style/SoleNestedConditional:
  Exclude:
    - 'app/helpers/thredded/icon_helper.rb'

# Offense count: 4
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
  Exclude:
    - 'app/models/concerns/thredded/search_parser.rb'
    - 'spec/support/system/fake_content.rb'
    - 'spec/system/thredded/user_edits_messageboard_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
  Exclude:
    - 'spec/spec_helper.rb'
